home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 3_0 / DOUBLEDE / WNEAVAIL.C < prev    next >
C/C++ Source or Header  |  1988-07-23  |  501b  |  24 lines

  1. #include    "MacTypes.h"
  2. #include    "OSUtil.h"
  3.  
  4. #define     WNETrapNum        0x60
  5. #define     UnImplTrapNum     0x9F
  6.  
  7. Boolean    WNEavail()
  8. {
  9.     /* 
  10.         Are we running under MultiFinder? If we are, then
  11.         the "WaitNextEvent" trap will be defined.
  12.     */
  13.     
  14.     Boolean     WNEIsImplemented;
  15.     OSErr        err;
  16.     SysEnvRec     theWorld;
  17.  
  18.     err = SysEnvirons(1,&theWorld);
  19.  
  20.      WNEIsImplemented = (theWorld.machineType >= 0) &&
  21.                         (NGetTrapAddress( WNETrapNum,ToolTrap) !=
  22.                         NGetTrapAddress(UnImplTrapNum,ToolTrap));
  23.     return(WNEIsImplemented);
  24. }